import '../api/api.dart';
import '../api/bean.dart';
import '../api/net.dart';
import 'package:tile/tile.dart';

getSituation(Board board) async {
  var result = await api.getAICountResult(
    RequestModel(situation_code, count_info(board), userId: 0),
  );
  board.showSituation(result['board_state'], refreshUI: true);
  var situationInfo =
      '${'白方胜率'}：${(result['whiteWinRate'] * 100).toStringAsFixed(2)}%，${'白方领先'}：${result['whiteWinScore'].toStringAsFixed(2)}${'目'}';

  board.showSituation(situationInfo, refreshUI: true);
  return situationInfo;
}
